package com.smart.model.util;

import com.smart.model.dtomapper.ProjectEquDtoMapper;
import com.smart.model.domain.ProjectEquDO;
import com.smart.model.vo.ProjectEquVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ProjectEquConvert {

    public static List<ProjectEquVO> buildProjectEquVoList(List<ProjectEquDO> projectEquDOList) {
        if (CollectionUtils.isEmpty(projectEquDOList)) {
            return Lists.newArrayList();
        }
        List<ProjectEquVO> projectEquVOList = new ArrayList<>();
        for (ProjectEquDO projectEquDO : projectEquDOList) {
            projectEquVOList.add(ProjectEquDtoMapper.INSTANCE.do2VO(projectEquDO));
        }

        return projectEquVOList;
    }
}
